import { Map } from "immutable";
import { CHANGE_HOME_DATA } from "./constant";

const defaultState = Map({
  homeData: [],
});

function reducer(state = defaultState, { type, data }) {
  switch (type) {
    case CHANGE_HOME_DATA:
      return state.set("homeData", data);
    default:
      return state;
  }
}

export default reducer;
